﻿using System;
using System.Collections.Generic;
using System.Collections;

namespace TFSAdministrationTool.Common
{
  public interface ITeamFoundationServerProxy
  {
    ServerInfo Connect(TfsProxyCollection serverCollection);
    void InitializeTeamProjectUsers();

    void AddUserToRole(string teamProject, string userName, string role);
    void RemoveUserFromRole(string teamProject, string userName, string role);
    void RemoveUser(string teamProject, string userName);

    ISharePointProxy GetSharePointProxy(string teamProject);
    void SharePointAddUserToRole(string teamProject, string userName, string role);
    void SharePointRemoveUserFromRole(string teamProject, string userName, string role);
    void SharePointRemoveUser(string teamProject, string userName);

    void ReportingServiceAddUserToRole(string teamProject, string userName, string role);
    void ReportingServiceRemoveUserFromRole(string teamProject, string userName, string role);
    void ReportingServiceRemoveUser(string teamProject, string userName);

    void SelectTeamProject(string name);

    TfsUserCollection GetTeamProjectUsers(string name);
    TfsUser GetUser(string userName);

    bool IsUserServiceAccount(TfsUser user);
    bool IsUserTeamFoundationAdministrator(TfsUser user);

    Dictionary<string, string> ShowAddGroupControl(System.Windows.Forms.IWin32Window parentWin);

    string ServerName { get; }
    Uri ServerUri { get; }

    Dictionary<string, string> TeamProjects { get;}
    TfsVersion ServerVersion { get; }

    ItemType SelectedItemType { get; }
    string SelectedTeamProject { get; }

    IReportServiceProxy ReportServiceProxy { get; }
    RoleValidator RoleValidator { get; }

    TfsUserCollection UserCollection { get; }
    TfsUserCollection UserCollectionClean { get; }
  } //End Interface
} //End Namespace